All Packages Class Hierarchy This Package Previous Next Index
Class java.naming.directory.AttributeSet
java.lang.Object
|
+----java.naming.directory.AttributeSet
- public class AttributeSet
- extends Object
- implements Serializable
In a directory, named objects can have associated with them
attributes. The AttributeSet represents a collection of attributes.
For example, you can request from the directory the attributes
associated with an object. Those attributes are returned in the
form of an AttributeSet.
Note that updates to AttributeSet (such as adding or removing an attribute)
does not affect the corresponding representation in the directory.
Updates to the directory can only be effected
using operations in the DSContext interface.
-
AttributeSet()
-
-
add(Attribute)
- Adds a new attribute to this attribute set.
-
add(String, Object)
- Adds a new attribute to this attribute set.
-
get(String)
- Retrieves the attribute with the given attribute id from this set.
-
getAttributeCount()
- Retrieves the number of attributes in this attribute set.
-
getAttributeIds()
- Retrieves an enumeration of the ids of the attributes in this
attribute set.
-
getAttributes()
- Retrieves an enumeration of the attributes in this attribute set.
-
remove(String)
- Removes the attribute with the attribute id 'attrId' from
this attribute set.
-
replace(Attribute)
- Replaces the attribute identified by the attribute
id of 'attr' to be attr.
-
replace(String, Object)
- Changes the value of the attribute identified by 'attrId'
to the value 'val'.
AttributeSet
public AttributeSet()
getAttributeCount
public int getAttributeCount()
- Retrieves the number of attributes in this attribute set.
- Returns:
- The number of attributes in this attribute set.
get
public Attribute get(String attrId)
- Retrieves the attribute with the given attribute id from this set.
Returns null if not found.
- Parameters:
- attrId - The id of the attribute to retrieve.
- Returns:
- The attribute identified by attrId; null if not found.
getAttributes
public AttributeEnumeration getAttributes()
- Retrieves an enumeration of the attributes in this attribute set.
- Returns:
- An enumeration of the attributes in this attribute set.
getAttributeIds
public StringEnumeration getAttributeIds()
- Retrieves an enumeration of the ids of the attributes in this
attribute set.
- Returns:
- An enumeration of the attributes' ids in this attribute set.
add
public void add(String attrId,
Object val) throws AttributeInUseException
- Adds a new attribute to this attribute set.
- Parameters:
- attrId - The id of the attribute to add.
- val - The value of the attribute to add.
- Throws: AttributeInUseException
- If attrId is already in this
attribute set.
add
public void add(Attribute attr) throws AttributeInUseException
- Adds a new attribute to this attribute set.
- Parameters:
- attr - The attribute to add.
- Throws: AttributeInUseException
- If attr is already in this
attribute set.
replace
public void replace(String attrId,
Object val)
- Changes the value of the attribute identified by 'attrId'
to the value 'val'. If attribute does not exist, add it
to attribute set.
- Parameters:
- attrId - The id of the attribute to update.
- val - The new value of 'attrId'.
replace
public void replace(Attribute attr)
- Replaces the attribute identified by the attribute
id of 'attr' to be attr. If attribute does not exist, add it
to attribute set.
- Parameters:
- attr - The new attribute to be added to this attribute set.
remove
public void remove(String attrId)
- Removes the attribute with the attribute id 'attrId' from
this attribute set. If the attribute does not exist, ignore.
- Parameters:
- attrId - The id of the attribute to remove.
All Packages Class Hierarchy This Package Previous Next Index